﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using University.Workshop.Presenters.Users;

namespace University.Workshop.Presentation.Users
{
    /// <summary>
    /// Interaction logic for PageReadView.xaml
    /// </summary>
    public partial class PageReadView : Page, IReadPrincipalView
    {
        PresenterReadUser pReadUserView;

        public PageReadView(Model.User user)
        {
            InitializeComponent();
            this.pReadUserView = new PresenterReadUser(this, user);
        }

        private void Page_Loaded(object sender, RoutedEventArgs e)
        {
            frmContent.Navigate(new PageFirstStepReadUser(pReadUserView));
            pReadUserView.FirstTime();
        }

        private void GoStepOne_Click(object sender, RoutedEventArgs e)
        {
            pReadUserView.GoStepOne();
        }

        private void GoStepTwo_Click(object sender, RoutedEventArgs e)
        {
            pReadUserView.GoStepTwo();
        }

        public void CallSecondPage()
        {

            PageSecondStepReadUser pp = new PageSecondStepReadUser(pReadUserView);
            ReadBasic = pp;
            frmContent.NavigationService.Navigate(pp);
            GoStepTwo.IsEnabled = true;
        }


        public void CallFirstPage()
        {
            PageFirstStepReadUser pp = new PageFirstStepReadUser(pReadUserView);
            ReadBasic = pp;
            frmContent.NavigationService.Navigate(pp);
        }


        public IReadBasicUser ReadBasic
        {
            get;
            set;
        }

        private void NextBtn_Click(object sender, RoutedEventArgs e)
        {
            pReadUserView.GoNextPage();
        }

        private void BackBtn_Click(object sender, RoutedEventArgs e)
        {
            pReadUserView.GoBackPage();
        }
    }
}
